package com.content.scaffold.common.exception;


import com.content.scaffold.common.web.ResponseCodeEnum;
import lombok.Getter;

/**
 * 未登录异常
 * @author xiaojl
 */
@Getter
public class UnauthorizedException extends RuntimeException {


    Integer code;
    String message;

    public UnauthorizedException() {
        this(ResponseCodeEnum.UNAUTHORIZED);
    }

    public UnauthorizedException(ResponseCodeEnum codeEnum) {
        this.code = codeEnum.getCode();
        this.message = codeEnum.getMessage();

    }
}
